(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0) → 0
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0) → 0
dbl(s(X)) → s(s(dbl(X)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
terms(X) → n__terms(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
terms(X) → n__terms(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
terms(N) → cons(recip(sqr(N)), n__terms(s(N)))
sqr(0') → 0'
sqr(s(X)) → s(add(sqr(X), dbl(X)))
dbl(0') → 0'
dbl(s(X)) → s(s(dbl(X)))
add(0', X) → X
add(s(X), Y) → s(add(X, Y))
first(0', X) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
terms(X) → n__terms(X)
first(X1, X2) → n__first(X1, X2)
activate(n__terms(X)) → terms(X)
activate(n__first(X1, X2)) → first(X1, X2)
activate(X) → X
Types:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
sqr,
add,
dbl,
activateThey will be analysed ascendingly in the following order:
add < sqr
dbl < sqr
(6) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
add, sqr, dbl, activate
They will be analysed ascendingly in the following order:
add < sqr
dbl < sqr
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
add(
gen_s:0'5_0(
n7_0),
gen_s:0'5_0(
b)) →
gen_s:0'5_0(
+(
n7_0,
b)), rt ∈ Ω(1 + n7
0)
Induction Base:
add(gen_s:0'5_0(0), gen_s:0'5_0(b)) →RΩ(1)
gen_s:0'5_0(b)
Induction Step:
add(gen_s:0'5_0(+(n7_0, 1)), gen_s:0'5_0(b)) →RΩ(1)
s(add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b))) →IH
s(gen_s:0'5_0(+(b, c8_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
dbl, sqr, activate
They will be analysed ascendingly in the following order:
dbl < sqr
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
dbl(
gen_s:0'5_0(
n788_0)) →
gen_s:0'5_0(
*(
2,
n788_0)), rt ∈ Ω(1 + n788
0)
Induction Base:
dbl(gen_s:0'5_0(0)) →RΩ(1)
0'
Induction Step:
dbl(gen_s:0'5_0(+(n788_0, 1))) →RΩ(1)
s(s(dbl(gen_s:0'5_0(n788_0)))) →IH
s(s(gen_s:0'5_0(*(2, c789_0))))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n788_0)) → gen_s:0'5_0(*(2, n788_0)), rt ∈ Ω(1 + n7880)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
sqr, activate
(13) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
sqr(
gen_s:0'5_0(
n1094_0)) →
gen_s:0'5_0(
*(
n1094_0,
n1094_0)), rt ∈ Ω(1 + n1094
0 + n1094
02 + n1094
03)
Induction Base:
sqr(gen_s:0'5_0(0)) →RΩ(1)
0'
Induction Step:
sqr(gen_s:0'5_0(+(n1094_0, 1))) →RΩ(1)
s(add(sqr(gen_s:0'5_0(n1094_0)), dbl(gen_s:0'5_0(n1094_0)))) →IH
s(add(gen_s:0'5_0(*(c1095_0, c1095_0)), dbl(gen_s:0'5_0(n1094_0)))) →LΩ(1 + n10940)
s(add(gen_s:0'5_0(*(n1094_0, n1094_0)), gen_s:0'5_0(*(2, n1094_0)))) →LΩ(1 + n109402)
s(gen_s:0'5_0(+(*(n1094_0, n1094_0), *(2, n1094_0))))
We have rt ∈ Ω(n3) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n3).
(14) Complex Obligation (BEST)
(15) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n788_0)) → gen_s:0'5_0(*(2, n788_0)), rt ∈ Ω(1 + n7880)
sqr(gen_s:0'5_0(n1094_0)) → gen_s:0'5_0(*(n1094_0, n1094_0)), rt ∈ Ω(1 + n10940 + n109402 + n109403)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
The following defined symbols remain to be analysed:
activate
(16) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol activate.
(17) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n788_0)) → gen_s:0'5_0(*(2, n788_0)), rt ∈ Ω(1 + n7880)
sqr(gen_s:0'5_0(n1094_0)) → gen_s:0'5_0(*(n1094_0, n1094_0)), rt ∈ Ω(1 + n10940 + n109402 + n109403)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1094_0)) → gen_s:0'5_0(*(n1094_0, n1094_0)), rt ∈ Ω(1 + n10940 + n109402 + n109403)
(19) BOUNDS(n^3, INF)
(20) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n788_0)) → gen_s:0'5_0(*(2, n788_0)), rt ∈ Ω(1 + n7880)
sqr(gen_s:0'5_0(n1094_0)) → gen_s:0'5_0(*(n1094_0, n1094_0)), rt ∈ Ω(1 + n10940 + n109402 + n109403)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n3) was proven with the following lemma:
sqr(gen_s:0'5_0(n1094_0)) → gen_s:0'5_0(*(n1094_0, n1094_0)), rt ∈ Ω(1 + n10940 + n109402 + n109403)
(22) BOUNDS(n^3, INF)
(23) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
dbl(gen_s:0'5_0(n788_0)) → gen_s:0'5_0(*(2, n788_0)), rt ∈ Ω(1 + n7880)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(24) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
(25) BOUNDS(n^1, INF)
(26) Obligation:
TRS:
Rules:
terms(
N) →
cons(
recip(
sqr(
N)),
n__terms(
s(
N)))
sqr(
0') →
0'sqr(
s(
X)) →
s(
add(
sqr(
X),
dbl(
X)))
dbl(
0') →
0'dbl(
s(
X)) →
s(
s(
dbl(
X)))
add(
0',
X) →
Xadd(
s(
X),
Y) →
s(
add(
X,
Y))
first(
0',
X) →
nilfirst(
s(
X),
cons(
Y,
Z)) →
cons(
Y,
n__first(
X,
activate(
Z)))
terms(
X) →
n__terms(
X)
first(
X1,
X2) →
n__first(
X1,
X2)
activate(
n__terms(
X)) →
terms(
X)
activate(
n__first(
X1,
X2)) →
first(
X1,
X2)
activate(
X) →
XTypes:
terms :: s:0' → n__terms:cons:nil:n__first
cons :: recip → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
recip :: s:0' → recip
sqr :: s:0' → s:0'
n__terms :: s:0' → n__terms:cons:nil:n__first
s :: s:0' → s:0'
0' :: s:0'
add :: s:0' → s:0' → s:0'
dbl :: s:0' → s:0'
first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
nil :: n__terms:cons:nil:n__first
n__first :: s:0' → n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
activate :: n__terms:cons:nil:n__first → n__terms:cons:nil:n__first
hole_n__terms:cons:nil:n__first1_0 :: n__terms:cons:nil:n__first
hole_s:0'2_0 :: s:0'
hole_recip3_0 :: recip
gen_n__terms:cons:nil:n__first4_0 :: Nat → n__terms:cons:nil:n__first
gen_s:0'5_0 :: Nat → s:0'
Lemmas:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_n__terms:cons:nil:n__first4_0(0) ⇔ n__terms(0')
gen_n__terms:cons:nil:n__first4_0(+(x, 1)) ⇔ cons(recip(0'), gen_n__terms:cons:nil:n__first4_0(x))
gen_s:0'5_0(0) ⇔ 0'
gen_s:0'5_0(+(x, 1)) ⇔ s(gen_s:0'5_0(x))
No more defined symbols left to analyse.
(27) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
add(gen_s:0'5_0(n7_0), gen_s:0'5_0(b)) → gen_s:0'5_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
(28) BOUNDS(n^1, INF)